package main

import (
	"context"
	send "hxz_rpc/kitex_gen/hxz_rpc/send"
	"hxz_rpc/until"
	"math/rand"
	"strconv"
)

// SendServiceImpl implements the last service interface defined in the IDL.
type SendServiceImpl struct{}

// GetSend implements the SendServiceImpl interface.
func (s *SendServiceImpl) GetSend(ctx context.Context, req *send.GetSendReq) (resp *send.GetSendResp, err error) {
	// TODO: Your code here...
	code := rand.Intn(9000) + 1000
	until.Hywx(req.Mobile, strconv.Itoa(code))
	resp = &send.GetSendResp{
		Code: int64(code),
	}
	return
}
